blob: ec08d4a0c0d2e7bf3a82708437d2c9ed345efd17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.yuzu.yuzu_emu.utils
import android.util.Log
import org.yuzu.yuzu_emu.BuildConfig
/**
* Contains methods that call through to [android.util.Log], but
* with the same TAG automatically provided. Also no-ops VERBOSE and DEBUG log
* levels in release builds.
*/
object Log {
private const val TAG = "Yuzu Frontend"
@JvmStatic
fun verbose(message: String) {
if (BuildConfig.DEBUG) {
Log.v(TAG, message)
}
}
@JvmStatic
fun debug(message: String) {
if (BuildConfig.DEBUG) {
Log.d(TAG, message)
}
}
@JvmStatic
fun info(message: String) {
Log.i(TAG, message)
}
@JvmStatic
fun warning(message: String) {
Log.w(TAG, message)
}
@JvmStatic
fun error(message: String) {
Log.e(TAG, message)
}
}
|